{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c351b6f6",
   "metadata": {},
   "outputs": [],
   "source": [
    "from collections import Counter\n",
    "import pandas as pd\n",
    "import benchmark"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "032000f0",
   "metadata": {},
   "outputs": [],
   "source": [
    "scenarios_readable = benchmark.load_scenarios(path='scenarios.yml')\n",
    "len(scenarios_readable)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c8b5eb30",
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "for scenario in scenarios_readable:\n",
    "    print(f'Room: {scenario.room}')\n",
    "    print(f'Receptacles: {scenario.receptacles}')\n",
    "    print(f'Seen objects: {scenario.seen_objects}')\n",
    "    print('Seen placements:')\n",
    "    for placement in scenario.seen_placements:\n",
    "        print(placement)\n",
    "    print(f'Unseen objects: {scenario.unseen_objects}')\n",
    "    print('Unseen placements:')\n",
    "    for placement in scenario.unseen_placements:\n",
    "        print(placement)\n",
    "    print(f'Annotator notes: {scenario.annotator_notes}')\n",
    "    print(f'Tags: {scenario.tags}')\n",
    "    print('\\n' + 80 * '-' + '\\n')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bef1f0aa",
   "metadata": {},
   "outputs": [],
   "source": [
    "counter = Counter([tag for scenario in scenarios_readable for tag in scenario.tags])\n",
    "pd.DataFrame.from_dict(counter, orient='index', columns=['Count'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "acd667c3",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
